<extend name="Public/base"/>

<block name="body">
    <script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
    <div class="main-title">
        <h2>
            <if condition="ACTION_NAME eq 'add'">
                新增奖品
            <else/>
                编辑奖品
            </if>
            <button class="btn btn-default btn-return" onclick="javascript:history.back(-1);return false;"><i class="glyphicon glyphicon-share-alt"></i> 返 回</button>
        </h2>
    </div>
    <form action="" method="post" class="form">
        <div class="form-item form-group">
            <label class="item-label">奖品名称<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" class="text form-control input-small" name="name" value="{$name}">
            </div>
        </div>
        <div class="form-item form-group">
            <label class="item-label">解锁人数<span class="check-tips">解锁奖品所需要的参加活动人数</span></label>
            <div class="controls">
                <input type="text" class="text form-control input-small" name="unlockcount" value="{$unlockcount}">
            </div>
        </div>
        <div class="form-item form-group cf">
            <label class="item-label">LOGO<span class="check-tips">(220*258px png)</span></label>
            <div class="controls">
                <div class="controls">
                    <input type="file" id="upload_picture_logo">
                    <input type="hidden" name="logo" id="cover_id_logo" value="{$logo}" />
                    <div class="upload-img-box">
                        <notempty name="logo">
                        <div class="upload-pre-item"><img src="{:url_format($logo)}"/></div>
                        </notempty>
                    </div>
                </div>
                {:hook('adminPicUpload', array('id'=>"upload_picture_logo",'return'=>"cover_id_logo", 'type' => 'path'))}                                                              
            </div>
        </div>
        <div class="form-item form-group">
            <label class="item-label">预览视频ID<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" class="text form-control input-small" name="video_id" value="{$video_id}">
            </div>
        </div>
        <div class="form-item form-group form-action">
            <input type="hidden" name="id" value="{$id}" />
            <button class="btn submit-btn ajax-post btn-success btn-block" id="submit" type="submit" target-form="form">确 定</button>
            <!-- <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button> -->
        </div>
    </form>
</block>

<block name="script">
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('CndotaGift/index')}');
    </script>
</block>
